<template>
  <div class="shouye">
    <div class="left-box" v-if="isMakeQianK">
       <el-menu
        style="height: 100%; width: 200px!important"
        default-active="1"
        class="el-menu-vertical-demo"
        background-color="#001529"
        text-color="#fff"
        active-text-color="#ffd04b"
        @select="handleSelect"
      >
        <el-menu-item index="1">
          <i class="el-icon-menu"></i>
          <span slot="title">func1</span>
        </el-menu-item>
        <el-menu-item index="2">
          <i class="el-icon-menu"></i>
          <span slot="title">func2</span>
        </el-menu-item>
      </el-menu>
    </div>
    <div class="right-box">
      <router-view />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      isMakeQianK: false,
    };
  },
  mounted() {
    this.isMakeQianK = window.__POWERED_BY_QIANKUN__ ? false : true;
  },
  methods: {
    handleSelect(key){
      if(key == 1){
        this.$router.push({path:'/sub-m1'})
      }
      if(key == 2){
        this.$router.push({path:'/sub-m2'})
      }
    }
  },
};
</script>
<style  scoped>
.shouye {
  height: 100%;
  width: 100%;
  display: flex;
}
.left-box{
  width: 200px;
  height: 100%;
}
.right-box{
  width: 100%;
  height: 100%;
}
</style>